import  requests
def get_html(url):
    heapq = {
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"}
    try:
        r =requests.get(url,headers=heapq)
        r.encoding = r.apparent_encoding
        r.raise_for_status()
        return  r.text
    except Exception as error:
        print(error)
if __name__ == '__main__':

    url ="http://www.baidu.com"
    print(get_html(url))